<?php add_javascript(Config::get_slot('root', '') . '../js/jquery.js')?>
<?php add_javascript(Config::get_slot('root', '') . 'js/menu.js')?>
<?php add_javascript(Config::get_slot('root', '') . 'js/tinymce/jscripts/tiny_mce/tiny_mce.js')?>
<?php add_javascript(Config::get_slot('root', '') . 'js/form.js')?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="fr" lang="fr">
  <head>
    <title><?php echo Config::get_slot('title', 'Site des associations de Genlis') ?></title>
    <link rel="shortcut icon" href="/favicon.ico" />
    <meta http-equiv="Content-type" content="text/html; charset=UTF-8"/>
    <?php include_javascript() ?>
    <?php include_css() ?>
    <?php $active = Config::get_slot('active', 'home')?>
    <script type="text/javascript">
            tinyMCE.init({
                mode : "exact",
                elements: "tinymce",
                plugins : "spellchecker,table,advhr,media,advlink,advimage,images",
                theme_advanced_toolbar_location : "top",
                theme_advanced_buttons1 : "bold,italic,underline,strikethrough,separator,"
                + "justifyleft,justifycenter,justifyright,justifyfull,separator,styleselect,formatselect,separator,"
                + "bullist,numlist,outdent,indent,advhr,separator,spellchecker,code",
                theme_advanced_buttons2 : "link,unlink,anchor,image,images,media,tablecontrols,separator"
                +"undo,redo,cleanup,separator,sub,sup,charmap",
                theme_advanced_buttons3 : "",
                docs_language : "fr",
                theme_advanced_toolbar_align : "left",
                theme_advanced_statusbar_location : "bottom",
                theme_advanced_resizing : true,
                theme_advanced_path : true,
                convert_newlines_to_brs : false,
                preformatted : true,
                relative_urls : false,
                theme_advanced_resize_horizontal : false,
                height:"300px",
                width:"690px",
                remove_linebreaks : false,
                spellchecker_languages : "+Français=fr,English=en",
                theme_advanced_blockformats : "p,h2,h3,h4,h5,h6,blockquote,dt,dd,code,pre",
                theme : "advanced"
            });
    </script>
  </head>
  <body>
    <div id="page">
      <div id="header">
	<a href="<?php echo link_to('')?>"><img src="../images/logo.png" class="logo" alt="website logo" /></a>
	<ul id="menu" class="clear">
            <li>
                <a href="<?php echo link_to('admin/index.html')?>">Accueil</a>
            </li>
            <?php if(isset($_SESSION['idassoc']) && is_numeric($_SESSION['idassoc']) && $_SESSION['idassoc'] == 1) :?>
            <li><span>Administration</span>
                <ul>
                    <li>
                        <a href="<?php echo link_to('categories/index.html')?>">Catégories</a>
                    </li>
                    <li>
                        <a href="<?php echo link_to('associations/index.html')?>">Associations</a>
                    </li>
                    <li>
                        <a href="<?php echo link_to('communes/index.html')?>">Communes</a>
                    </li>
                </ul>
            </li>
            <?php endif;?>
            <li><span>Mon association</span>
                <ul>
                    <?php if(isset($_SESSION['idassoc']) && is_numeric($_SESSION['idassoc'])) :?>
                    <li>
                        <a href="<?php echo link_to('associations/editinfo.html?id='.$_SESSION['idassoc'])?>">Informations</a>
                    </li>
                    <?php endif;?>
                    <li>
                        <a href="<?php echo link_to('actualites/index.html')?>">Gestion des actualités</a>
                    </li>
                    <li>
                        <a href="<?php echo link_to('evenements/index.html')?>">Gestion du planning</a>
                    </li>
                </ul>
            </li>
            <?php if(isset($_SESSION['idassoc']) && is_numeric($_SESSION['idassoc'])):?>
            <li class="logout_button">
                <a href="<?php echo link_to('login/logout.html')?>">Se déconnecter</a>
            </li>
            <?php endif;?>
	</ul>
      </div>
      <div id="content" class="clear">
	<?php echo $content ?>
      </div>
      <div id="footer" class="clear">
	<p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit.&nbsp;&nbsp;</p>
      </div>
    </div>
  </body>
</html>
